<?php
/**
* @author Bimal Poudel
* @copyright since 2006, Bimal Poudel
* @package Smarty Framework
* @support http://www.odesk.com/users/~~dd91d11caed0cdce
* @contact http://www.sanjaal.com
* @company Sanjaal Corps
*/

# Created on: 2012-04-08 12:26:21 248

/**
* Details of an entry in [ pokes ]
*/

$pokes = new pokes();
$collection_id = $variable->get('id', 'integer', 0); # Entity ID
$code = $variable->get('code', 'string', ''); # Protection Code

if(!$collection_id || !$code)
{
	# Page was loaded without the ID paremeter
	stopper::url('pokes-direct-access-error.php?context=identity');
}
else
{
	# Check for valid requests
	# if(!$pokes->is_valid($collection_id, $code)) stopper::message('Invalid request.', false);
	
	# Try to load the details
	if($pokes_details = $pokes->details($collection_id, $code))
	{
		# We aim to reach here only.
		$smarty->assignByRef('pokes', $pokes_details);
	}
	else
	{
		# Record not found
		stopper::url('pokes-direct-access-error.php?context=data');
	}
}
?>